<?php
namespace app\api\controller;
use x\Xbase;
use x\my\BankValidate;
class H5 extends Xbase{
    public $view;
    //显示文章h5
    public function article($id){
        $info = $this->db->find('article',$id);
        $d = [
            'info' => $info,
        ];
        $this->fetch($d);
    }

    public function goodsdetail(){
        $id = $this->get('id');
        $rs = $this->db->query('select content from goods where id=? order by id asc',[$id],1);

        $d = [
            'info' => $rs,
        ];
        $this->fetch($d);
    }

    public function getword(){
        $id = $this->get('id');
        $rs = $this->db->query('select content from word where id=? order by id asc',[$id],1);

        $d = [
            'info' => $rs,
        ];
        $this->fetch($d);
    }

    //显示文章h5
    public function articledetail(){
        $id = $this->get('id');
        $info = $this->db->find('article',$id);
        $d = [
            'info' => $info,
        ];
        $this->fetch($d);
    }

    //用户等级设置列表
    public function userlevelconfig(){
        $id = $this->get('id');
        $info = $this->db->find('user_level_config',$id);
        $d = [
            'info' => $info,
        ];
        $this->fetch($d);
    }

    //协议
    public function agreement(){
        $id = $this->get('id');
        $info = $this->db->find('page',$id);
        $d = [
            'info' => $info,
        ];
        $this->fetch($d);
    }

    public function test(){
        $BankNumber = "6222600110026276732";
        $UserName = "杨永平";
        $rs = BankValidate::getBankBindUserByJson($BankNumber,$UserName);
        $rs = json_decode($rs,true);
        t($rs);
    }

}
